home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextLibrary / Frameworks / NEXTIME.framework / Versions / A / Headers / NTThread.h < prev    next >
Encoding:
Text File  |  1995-08-30  |  1.2 KB  |  53 lines

  1. /*
  2.  *  NTThread.h
  3.  *     Copyright 1994, NeXT Computer, Inc.
  4.  *    
  5.  *    Category on NSThread to support scheduling controls for threads.
  6.  *    NULL implementation on strict OPENSTEP platforms.
  7.  *
  8.  *    13 Oct 1994 mpaque Created.
  9.  */
  10.  
  11. #import <Foundation/NSThread.h>
  12.  
  13.  
  14. typedef enum {
  15.     NTThreadPolicy_Timeshare,
  16.     NTThreadPolicy_FixedPriority
  17. } NTThreadPolicy;
  18.  
  19. typedef enum {
  20.     NTThreadPriority_RealTime = 0,
  21.     NTThreadPriority_UrgentIO = 1,
  22.     NTThreadPriority_NormalIO = 2,
  23.     NTThreadPriority_Housekeeping = 3
  24. } NTThreadPriority;
  25.  
  26. /*
  27.  * A class for representing a thread of execution within the NT server.
  28.  *
  29.  * NTThreads also hold generally useful thread dependent information.
  30.  *
  31.  */
  32. @interface NSThread(NEXTIME_Extensions)
  33.  
  34. /* Scheduling goodies */
  35. - (void) yield;
  36. - (void) yieldToThread:(NSThread *)thread;
  37. - (void) yieldForInterval:(double)interval;
  38. - (void) yieldToThread:(NSThread *)thread forInterval:(double)interval;
  39. - (void)wakeup;
  40.  
  41. /* Naming a thread */
  42. - (void)setName:(NSString *)name;
  43. - (NSString *)name;
  44.  
  45. /* Thread policy and priority controls */
  46. - (void)setPolicy:(NTThreadPolicy)policy;
  47. - (void)setPriority:(NTThreadPriority)priority;
  48. - (NTThreadPolicy)policy;
  49. - (NTThreadPriority)priority;
  50.  
  51. @end
  52.  
  53.